<template>
  <div>
    <el-card id="card1">
      <el-form :inline="true" :model="formInline" class="demo-form-inline" label-position="top">
        <el-row type="flex">
          <el-col :span="6">
            <el-form-item label="盘点单号">
              <el-select v-model="formInline.id" placeholder="请选择" style="width: 100%;">
                <el-option
                  v-for="item in warehouse"
                  :key="item.id"
                  :value="item.id"
                  :label="item.name"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="盘点状态">
              <el-select
                v-model="formInline.status"
                placeholder="请选择"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in enumeration.inventory.options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="盘点类型">
              <el-select
                v-model="formInline.type"
                placeholder="请选择"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in enumeration.counting.options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6" class="btnpos">
            <el-form-item>
              <el-button type="primary" class="btnSearch" @click="btnSearch">搜索</el-button>
              <el-button type="primary" class="btnReset" @click="btnReset">重置</el-button>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="货主">
              <el-select
                v-model="formInline.ownerId"

                placeholder="请选择"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in enumeration.owner.options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="盘点货区">
              <el-input type="text" placeholder="请选择" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-card>
  </div>
</template>

<script>
import enumeration from '@/components/SearchControl/selete'
import { getStock } from '@/api/latest-storage.js'
export default {
  name: 'YuanfengWarehouseLatestStorage',
  data() {
    return {
      formInline: {},
      enumeration,
      options: {},
      pageConfig: {
        current: 1,
        size: 10
      },
      warehouse: []
    }
  },

  created() {
    this.init()
  },

  methods: {
    // 初始化页面
    async init() {
      this.warehouse = (await getStock()).data.data
    },
    // 获取仓库名称

    btnSearch() {

    },
    btnReset() {

    }
  }
}
</script>

<style lang="scss" scoped>
@import '@/styles/list.scss';

</style>
